-- GENERATED SPELL FOR [Necrolord] --


function spell0_24014(pUnit, Event) --@Curse of Weakness,n/a--
pUnit:FullCastSpellOnTarget(18267,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24014', 30289, 1)
end

function spell1_24014(pUnit, Event) --@Drain Life,Drain--
pUnit:FullCastSpellOnTarget(17173,pUnit:GetRandomPlayer(0))
pUnit:RegisterEvent('Sorts_24014', 5000, 1)
end

function spell2_24014(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(9613,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24014', 3000, 1)
end

function Sorts_24014(pUnit, Event)
local choix_sorts_24014 = math.random(0, 2)
if choix_sorts_24014 == 0 then
pUnit:RegisterEvent('spell0_24014', 1, 1)
end
if choix_sorts_24014 == 1 then
pUnit:RegisterEvent('spell1_24014', 1, 1)
end
if choix_sorts_24014 == 2 then
pUnit:RegisterEvent('spell2_24014', 1, 1)
end
end

function mob24014_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_24014', math.random(1500, 3000), 1)
end

function mob24014_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24014_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24014_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(24014, 1, 'mob24014_Action')
RegisterUnitEvent(24014, 2, 'mob24014_Leave')
RegisterUnitEvent(24014, 3, 'mob24014_Kill')
RegisterUnitEvent(24014, 4, 'mob24014_Die')
